from django.contrib.auth.decorators import login_required
from django.urls import path, re_path
from . import views

# 2.x后必须指定app_name
app_name = 'users'

urlpatterns = [
    path('loginCheck/', views.login_check, name='loginCheck'),
    path('logout/', views.login_out, name='logout'),
    # 人员
    path('users_view/', login_required(views.users_view), name='users_view'),
    path('users_list/', login_required(views.users_list), name='users_list'),
    path('users_list1/', login_required(views.users_list1), name='users_list1'),
    path('users_insert_view/', login_required(views.users_insert_view), name='users_insert_view'),
    path('users_roles/', login_required(views.users_roles), name='users_roles'),  # 这里是为了显示给前台多选下拉框
    path('users_insert/', login_required(views.users_insert), name='users_insert'),
    path('users_edit_view/', login_required(views.users_edit_view), name='users_edit_view'),
    path('users_edit/<int:id>', login_required(views.users_edit), name='users_edit'),
    path('users_resetpass/<int:user_code>', login_required(views.users_resetpass), name='users_resetpass'),
    path('users_del/<int:id>', login_required(views.users_del), name='users_del'),
    path('users_search/', login_required(views.users_search), name='users_search'),
    path('users_sign/', login_required(views.users_sign), name='users_sign'),# 查询可以签字的人员
    path('dept_users/',login_required(views.dept_users), name='dept_users') # 查询某个部门下的员工
]
#
